﻿<%@ Page Language="C#" MasterPageFile="../MasterPages/MedianamikModule.master" AutoEventWireup="true" CodeBehind="SearchResults.aspx.cs" 
Inherits="Medianamik.UI.ContentManagement.SearchResults"  %>
<%@ Import Namespace="Medianamik.Core" %>

<asp:Content ID="CenterContent" runat="server" ContentPlaceHolderID="CenterContent">
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <p>
            <asp:Literal runat="server" Text="<%$Resources: Medianamik_ContentManagement, SearchResult_YourSearchQuery %>"></asp:Literal> <strong><%= HttpUtility.UrlDecode(Request["q"]) %></strong>
            </p>            
            <lock:LockInfoTooltip runat="server" id="LockInfoTooltip" OnLockDeleted="LockInfoTooltip_LockDeleted"></lock:LockInfoTooltip>
            <telerik:RadGrid runat="server" 
                             ID="GridNodes" 
                             EnableEmbeddedSkins="false" 
                             Skin="Medianamik" 
                             AllowPaging="True"
                             AllowCustomPaging ="true"
                             OnNeedDataSource="GridNodes_NeedDataSource"
                             AutoGenerateColumns="false" 
                             AllowMultiRowSelection="false">
                <PagerStyle Mode = "NextPrevAndNumeric"  Position ="TopAndBottom" />
                <MasterTableView DataKeyNames="ID">
                    <Columns>
                        <telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <med:NodeTypeIcon  ID="NodeTypeIcon1" runat="server" NodeTypeId='<%# Eval("NodeType.ID") %>'></med:NodeTypeIcon>
                                <p>
                                    <asp:Hyperlink runat="server" NavigateUrl='<%# "NodeList.aspx?" + DefaultParamNames.ParentNodeID + "=" + Eval("ParentID")  %>' Text='<%# Eval("DisplayName") %>'/>
                                </p>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn HeaderStyle-Width="1%" HeaderText="Actions">
				            <HeaderStyle HorizontalAlign="Center" />
				            <ItemStyle CssClass="Actions" />
				            <ItemTemplate>
					            <table border="0" cellpadding="0" cellspacing="0" align="center">
						            <tr>
							            <td>
							            <med:LockButton Enabled="true" runat="server" NavigateUrl='<%# "Nodemanagement.aspx?" + DefaultParamNames.NodeID + "=" + Eval("ID").ToString() + "&ReturnUrl=" + ReturnUrl %>'
                                                NodeId='<%# Eval("ID") %>' ImageUrl="/Medianamik/images/Icones/Ico_Edition.gif"
                                                LockedOrDisabledImageUrl="/Medianamik/images/Icones/Ico_EditionInactif.gif" OnRequestFailed="LockLink_RequestFailed" />
                                                
							            </td>
						                <td><med:DiffLink runat ="server"  NodeId='<%# Eval("ID") %>'  /></td>
						            </tr>
					            </table>
				            </ItemTemplate>
			            </telerik:GridTemplateColumn>
                     </Columns>
                     <NoRecordsTemplate>
			            <asp:Literal ID="NoRecords" runat="server" Text="<%$ Resources: Medianamik_ContentManagement, NoRecordsToDisplay %>" />
			        </NoRecordsTemplate>
                </MasterTableView>
	            <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
            </telerik:RadGrid>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>


